import axios from 'axios';
import {
  loginreq,
  req,
  captchareq,
  req_info,
  reqPage,
  reqDeleteUser,
  Adduser,
  Permission,
  singer,
  file,
  number
} from './axiosFun';

const BaseUrl = "http://60.205.253.99:7654/"
// const BaseUrl = "http://127.0.0.1:7654/"

//通过店铺id拿到该店铺的菜品
export const getFoodsByShopId=(shop_id,page,size) => {return number("get",BaseUrl+`food/getFoodsByPage?shop_id=${shop_id}&page=${page}&size=${size}`)}
//通过食物id获取食物的信息
export const TheInformationOfADishByTheDishId=(id)=>{return number("get",BaseUrl+`food/queryTheInformationOfADishByTheDishId?id=${id}`)}
//分页查询食品
export const getAllFoodsByPaging=(page,size) =>{return number("get",BaseUrl+`food/getAllFoodsByPaging?page=${page}&size=${size}`)}
//获取所有菜品的数量
export const getTheQuantityOfAllDishes=()=>{return number("get",BaseUrl+`food/getTheQuantityOfAllDishes`)}
//按照菜品的销售热度获取菜品
export const getFoodsByTypeAndPage=(typeId,page,size) =>{return number("get",BaseUrl+`food/getFoodsByTypeAndPage?typeId=${typeId}&page=${page}&size=${size}`)}
//通过菜品的销售热度获取该类菜品的数量
export const getNumberByType=(typeId) =>{return number("get",BaseUrl+`food/getNumberByType?typeId=${typeId}`)}
//食品搜索引擎
export const searchEngie=(keyword) => {return number("get",BaseUrl+`food/searchEngine?keyword=${keyword}`)}
//通过名字查询多条菜品
export const searchByname=(name) =>{return number("get",BaseUrl+`food/searchByname?name=${name}`)}
